import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class byatestream {
    public static void main(String[] args) throws Exception {


            FileInputStream  str=new FileInputStream("C:\\1.1\\123.jpeg");
            FileOutputStream out=new FileOutputStream("C:\\2\\456.jpeg");
            byte[] bytes=new byte[1024];
            int read = 0;
           while ((read=str.read(bytes))!=-1){
                out.write(bytes,0,read);




        }


}}
